package com.yy.permissions_general.module.system.notice.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yy.permissions_general.common.constant.SystemConstant;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 站内消息
 * </p>
 *
 * @author YY
 * @since 2022-01-27
 */
@Data
@TableName("sys_notice")
public class Notice extends Model<Notice> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 标题
     */
    @TableField("title")
    private String title;

    /**
     * 内容
     */
    @TableField("content")
    private String content;

    /**
     * 接收者ID
     */
    @TableField("accept_id")
    private Integer acceptId;

    /**
     * 接收者
     */
    @TableField("accept")
    private String accept;

    /**
     * 类型
     */
    @TableField("type")
    private String type;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = SystemConstant.TIME_FORMAT)
    private Date createTime;

    /**
     * 创建人ID
     */
    @TableField(value = "create_id", fill = FieldFill.INSERT)
    private Integer createId;

    /**
     * 创建名称
     */
    @TableField(value = "create_name", fill = FieldFill.INSERT)
    private String createName;

    /**
     * 修改时间
     */
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    @JsonFormat(pattern = SystemConstant.TIME_FORMAT)
    private Date updateTime;

    /**
     * 修改人ID
     */
    @TableField(value = "update_id", fill = FieldFill.UPDATE)
    private Integer updateId;

    /**
     * 修改名称
     */
    @TableField(value = "update_name", fill = FieldFill.UPDATE)
    private String updateName;





    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
